package com.itheima.domain;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.Set;

@ConfigurationProperties(prefix = "person")
@Component
public class Person {
	private String name;
	private Integer age;
	private String sex;
	private String likes[];
	private Set<Booke> bookes;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String[] getLikes() {
		return likes;
	}

	public void setLikes(String[] likes) {
		this.likes = likes;
	}

	public Set<Booke> getBookes() {
		return bookes;
	}

	public void setBookes(Set<Booke> bookes) {
		this.bookes = bookes;
	}

	@Override
	public String toString() {
		return "Person{" +
				"name='" + name + '\'' +
				", age=" + age +
				", sex='" + sex + '\'' +
				", likes=" + Arrays.toString(likes) +
				", bookes=" + bookes +
				'}';
	}
}
